#ifndef _UTILITY_H_
#define _UTILITY_H_

#ifndef NULL
#define NULL (0L)
#endif

#define SAFE_RELEASE(r) { if(r) { r->Release(); r = NULL; } }
#define SAFE_SHUTDOWN(s) { if(s) { s->Shutdown(); s = NULL; } }
#define SAFE_DELETE(d) { if(d) { delete d; d = NULL; } }
#define SAFE_ARRDELETE(d) { if(d) { delete [] d; d = NULL; } }

#endif